package com.sp.scmdb.common;

import java.util.Map;

import com.google.common.collect.Maps;

public abstract class CommonParamter {

	/** 0-自定义消息 1-操作成功 2-操作失败 3-数据重复 4-登录失败 5-系统保留信息 **/
	public static final String CHECK_FLG = "0";
	public static final String CHECK_SUCCESS = "1";
	public static final String CHECK_FAIL = "2";
	public static final String CHECK_REPEAT = "3";
	public static final String CHECK_LOGINFAIL = "4";
	public static final String CHECK_SYSTEMRESERVED = "5";

	public static final String OP_SUCCESS = "操作成功";
	public static final String OP_FAIL = "操作失败";
	public static final String OP_REPEAT = "已存在";
	public static final String OP_LOGINFAIL = "用户名或密码错误！";
	public static final String USER_ENTITY = "userEntity";

	public static String TITLE = "公园人员定位系统";
	public static String FLUSHTIME = "10";
	public static String userID="";
	public static String password="";

	/**
	 * 解析数据全局变量
	 * 
	 * @author lzj
	 * 
	 */
	public class ParseData {
		public static final String labelType = "00";//游客
		public final static int NOTEXISTLRM = 1; // 读头不存在
		public final static int ENTRYLRM = 2; // 
		public final static int IOLRM = 3; // 园内读头
		public final static int INFRAME = 4; // 进入读头数据帧
		public final static int OUTFRAME = 5; // 离开读头数据帧

		public final static int INMINE = 10; // 入园状态
		public final static int OUTMINE = 11; // 出园状态
		public final static int callAlarm = 1; // 呼叫报警
		public final static int powerAlarm = 1; // 低电量报警
	}

	public class AlarmData {
		public static final int intervalTime = 2;
		public static final int state = 0;
		public static final int cancelState = 1;
	}

	// 记录userId
	public static int oldUserId;

	public static class TypeCommon {
		public static Map<String, String> getAreaType() {
			Map<String, String> areaType = Maps.newHashMap();
			areaType.put("0", "普通区域");
			areaType.put("1", "重点区域");
			areaType.put("2", "限制区域");
			return areaType;
		}
		public static Map<String, String> getLabelType() {
			Map<String, String> labelType = Maps.newHashMap();
			labelType.put("00", "游客");
			labelType.put("01", "游船");
			labelType.put("10", "员工");
			labelType.put("11", "自行车");
			return labelType;
		}
		public static Map<String, String> getPowerFlag() {
			Map<String, String> powerFlag = Maps.newHashMap();
			powerFlag.put("00", "最低功率");
			powerFlag.put("01", "次低功率");
			powerFlag.put("10", "次高功率");
			powerFlag.put("11", "最高功率");
			return powerFlag;
		}

		public static Map<Integer, String> getMapUseType() {
			Map<Integer, String> useType = Maps.newHashMap();
			useType.put(0, "未使用");
			useType.put(1, "使用");
			return useType;
		}

		public static Map<String, String> getUseType() {
			Map<String, String> useType = Maps.newHashMap();
			useType.put("0", "未使用");
			useType.put("1", "使用");
			return useType;
		}

		public static Map<Integer, String> getReaderState() {
			Map<Integer, String> useType = Maps.newHashMap();
			useType.put(0, "失败");
			useType.put(1, "正常");
			return useType;
		}

		public static Map<Integer, String> getReaderType() {
			Map<Integer, String> useType = Maps.newHashMap();
			useType.put(1, "考勤");
			useType.put(2, "出入口");
			return useType;
		}

		public static Map<String, String> getTagState() {
			Map<String, String> useType = Maps.newHashMap();
			useType.put("0", "电量正常");
			useType.put("1", "低电量");
			return useType;
		}

		public static Map<String, String> getSexType() {
			Map<String, String> useType = Maps.newHashMap();
			useType.put("2", "女");
			useType.put("1", "男");
			return useType;
		}

		public static Map<String, String> getYesNo() {
			Map<String, String> useType = Maps.newHashMap();
			useType.put("2", "否");
			useType.put("1", "是");
			return useType;
		}
		
		/**
		 * 报警确认状态
		 */
		public static Map<String, String> getConfirmType() {
			Map<String, String> confirmType = Maps.newHashMap();
			confirmType.put("0", "未确认");
			confirmType.put("1", "已确认");
			return confirmType;
		}
		
		/**
		 *  是否特种人员
		 */
		public static Map<String, String> getEmpType() {
			Map<String, String> confirmType = Maps.newHashMap();
			confirmType.put("0", "否");
			confirmType.put("1", "是");
			return confirmType;
		}
	}
}
